Conversation
- 불필요한 코드 삭제
|
Warning Rate limit exceeded
⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. 📒 Files selected for processing (2)
Walkthrough사용되지 않는 문서, CI 설정, 빌드/테스트 관련 설정 및 일부 QueryDSL/예외 핸들링 관련 코드가 제거되거나 간소화된 변경입니다. Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs
Suggested labels
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Test Results 38 files 38 suites 10s ⏱️ Results for commit a9b4700. ♻️ This comment has been updated with latest results. |
There was a problem hiding this comment.
Actionable comments posted: 3
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In
`@src/main/java/ku_rum/backend/domain/oauth/handler/OAuth2AuthenticationSuccessHandler.java`:
- Around line 60-67: In determineTargetUrl inside
OAuth2AuthenticationSuccessHandler, replace the RuntimeException thrown for an
unauthorized redirect URI (checked against REDIRECT_URI_PARAM_COOKIE_NAME) with
a 4xx-mapped exception (e.g., throw new AccessDeniedException("승인되지 않은 리다이렉션
URI입니다")) so the response is a client error (403) instead of 500; update imports
accordingly or alternatively create/throw a custom 4xx exception that your
global handler maps to the desired status.
In
`@src/main/java/ku_rum/backend/global/handler/GlobalExceptionControllerAdvice.java`:
- Around line 42-47: The current handleBadRequest in
GlobalExceptionControllerAdvice mixes NoHandlerFoundException and
TypeMismatchException returning HTTP 400 and URL_NOT_FOUND for both; split them
into two distinct handlers or branch inside handleBadRequest to return the
correct status/message: handle NoHandlerFoundException separately (use
`@ResponseStatus`(HttpStatus.NOT_FOUND) and return
BaseErrorResponse(URL_NOT_FOUND)) and handle TypeMismatchException with
`@ResponseStatus`(HttpStatus.BAD_REQUEST) returning the appropriate bad-request
error constant (e.g., BAD_REQUEST or INVALID_TYPE); update method
signatures/logging accordingly so each exception maps to the correct HTTP status
and error code.
In
`@src/test/java/ku_rum/backend/domain/common/mail/presentation/MailControllerTest.java`:
- Around line 110-112: Tests and documentation disagree on the type of the
"code" field: the test asserts jsonPath("$.code").value("200") (string) while
the API docs use
fieldWithPath("code").type(JsonFieldType.NUMBER).description(...). Make them
consistent by matching the actual response type: update the test assertion in
MailControllerTest to assert a numeric value (e.g.,
jsonPath("$.code").value(200)) if the API returns a number, or change the
documentation fieldWithPath("code") to JsonFieldType.STRING if the API returns a
string; locate the mismatch by looking for jsonPath("$.code").value("200") and
fieldWithPath("code").type(JsonFieldType.NUMBER") and update one side
accordingly.
ℹ️ Review info
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (6)
src/main/java/ku_rum/backend/domain/oauth/handler/OAuth2AuthenticationSuccessHandler.javasrc/main/java/ku_rum/backend/global/config/QueryDslConfig.javasrc/main/java/ku_rum/backend/global/handler/GlobalExceptionControllerAdvice.javasrc/test/java/ku_rum/backend/domain/common/mail/presentation/MailControllerTest.javasrc/test/java/ku_rum/backend/domain/user/presentation/UserControllerTest.javasrc/test/java/ku_rum/backend/domain/user/presentation/UserProfileControllerTest.java
💤 Files with no reviewable changes (1)
- src/main/java/ku_rum/backend/global/config/QueryDslConfig.java
✅ Files skipped from review due to trivial changes (1)
- src/test/java/ku_rum/backend/domain/user/presentation/UserControllerTest.java
src/main/java/ku_rum/backend/domain/oauth/handler/OAuth2AuthenticationSuccessHandler.java
Show resolved
Hide resolved
src/main/java/ku_rum/backend/global/handler/GlobalExceptionControllerAdvice.java
Show resolved
Hide resolved
src/test/java/ku_rum/backend/domain/common/mail/presentation/MailControllerTest.java
Show resolved
Hide resolved
|



#️⃣ 연관된 이슈
closes #443
📝작업 내용
작업 상세 내용
상세 내용을 입력해주세요.
💬리뷰 요구사항
Summary by CodeRabbit
릴리스 노트
Documentation
Chores
Refactor
Bug Fixes / Behavior
Tests